home *** CD-ROM | disk | FTP | other *** search
/ Inside Multimedia 1994 April / Inside Multimedia CD-ROM (April 1994).iso / prg / gs / gssource.exe / WATC.MAK < prev    next >
Encoding:
Text File  |  1992-08-24  |  7.2 KB  |  275 lines

  1. #    Copyright (C) 1991, 1992 Aladdin Enterprises.  All rights reserved.
  2. #    Distributed by Free Software Foundation, Inc.
  3. #
  4. # This file is part of Ghostscript.
  5. #
  6. # Ghostscript is distributed in the hope that it will be useful, but
  7. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. # to anyone for the consequences of using it or for whether it serves any
  9. # particular purpose or works at all, unless he says so in writing.  Refer
  10. # to the Ghostscript General Public License for full details.
  11. #
  12. # Everyone is granted permission to copy, modify and redistribute
  13. # Ghostscript, but only under the conditions described in the Ghostscript
  14. # General Public License.  A copy of this license is supposed to have been
  15. # given to you along with Ghostscript so you can know your rights and
  16. # responsibilities.  It should be in a file named COPYING.  Among other
  17. # things, the copyright notice and this notice must be preserved on all
  18. # copies.
  19.  
  20. # makefile for Ghostscript, MS-DOS/Watcom C386 platform.
  21.  
  22. # ------------------------------- Options ------------------------------- #
  23.  
  24. ###### This section is the only part of the file you should need to edit.
  25.  
  26. # ------ Generic options ------ #
  27.  
  28. # Define the default directory/ies for the runtime
  29. # initialization and font files.  Separate multiple directories with \;.
  30. # Use / to indicate directories, not a single \.
  31.  
  32. GS_LIB_DEFAULT=c:/gs\;c:/gs/fonts
  33.  
  34. # Define the name of the Ghostscript initialization file.
  35. # (There is no reason to change this.)
  36.  
  37. GS_INIT=gs_init.ps
  38.  
  39. # Choose generic configuration options.
  40.  
  41. # Setting DEBUG=1 includes debugging features (-Z switch) in the code.
  42. # Code runs substantially slower even if no debugging switches are set,
  43. # and also takes about another 25K of memory.
  44.  
  45. DEBUG=0
  46.  
  47. # Setting TDEBUG=1 includes symbol table information for the Watcom debugger.
  48. # No execution time or space penalty, just larger .OBJ and .EXE files
  49. # and slower linking.
  50.  
  51. TDEBUG=0
  52.  
  53. # Setting NOPRIVATE=1 makes private (static) procedures and variables public,
  54. # so they are visible to the debugger and profiler.
  55. # No execution time or space penalty, just larger .OBJ and .EXE files.
  56.  
  57. NOPRIVATE=0
  58.  
  59. # ------ Platform-specific options ------ #
  60.  
  61. # Define the drive, directory, and compiler name for the Watcom C files.
  62. # COMP is the full compiler path name (normally \watcom\bin\wcc386p).
  63. # LINK is the full linker path name (normally \watcom\bin\wlinkp).
  64. # CLINK is the compile-and-link utility full path name (normally
  65. #   \watcom\binb\wcl386).
  66. # STUB is the full path name for the DOS extender stub (normally
  67. #   \watcom\binb\wstub.exe).
  68. # INCDIR contains the include files (normally \watcom\h).
  69. # LIBDIR contains the library files (normally \watcom\lib386).
  70. # Note that INCDIR and LIBDIR are always followed by a \,
  71. #   so if you want to use the current directory, use an explicit '.'.
  72.  
  73. COMP=c:\watc\bin\wcc386p
  74. LINK=c:\watc\bin\wlinkp
  75. CLINK=c:\watc\binb\wcl386
  76. STUB=c:\watc\binb\wstub.exe
  77. INCDIR=c:\watc\h
  78. LIBDIR=c:\watc\lib386
  79.  
  80. # Choose platform-specific options.
  81.  
  82. # Define the processor (CPU) type.  Options are 386 or 486.
  83. # Currently the only difference is that 486 always uses in-line
  84. # floating point.
  85.  
  86. CPU_TYPE=386
  87.  
  88. # Define the math coprocessor (FPU) type.  Options are 0, 287, or 387.
  89. # If the CPU type is 486, the FPU type is irrelevant, since the 80486
  90. # CPU includes the equivalent of an 80387 on-chip.
  91. # A non-zero option means that the executable will only run if a FPU
  92. # of that type (or higher) is available: this is NOT currently checked
  93. # at runtime.
  94. #   Code is significantly faster.
  95.  
  96. FPU_TYPE=0
  97.  
  98. # ---------------------------- End of options ---------------------------- #
  99.  
  100. # We want Unix-compatible behavior.  This is part of it.
  101.  
  102. .NOCHECK
  103.  
  104. # Define additional extensions to keep `make' happy
  105.  
  106. .EXTENSIONS: .be .z
  107.  
  108. # Define the platform name.
  109.  
  110. PLATFORM=watc_
  111.  
  112. # Define the name of the makefile -- used in dependencies.
  113.  
  114. MAKEFILE=watc.mak
  115.  
  116. # Define the ANSI-to-K&R dependency.  Watcom C accepts ANSI syntax.
  117.  
  118. AK=
  119.  
  120. # Define the extensions for the object and executable files.
  121.  
  122. OBJ=obj
  123. XE=.exe
  124.  
  125. # Define the need for uniq.
  126.  
  127. UNIQ=uniq$(XE)
  128.  
  129. # Define the current directory prefix, shell quote string, and shell name.
  130.  
  131. EXPP=dos4gw
  132. QQ="
  133. SH=
  134. SHP=
  135.  
  136. # Define the generic compilation flags.
  137.  
  138. PLATOPT=-zq
  139.  
  140. !ifeq CPU_TYPE 486
  141. FPFLAGS=-fpi87
  142. !else
  143. !ifeq FPU_TYPE 387
  144. FPFLAGS=-fpi87
  145. !else
  146. !ifeq FPU_TYPE 287
  147. FPFLAGS=-fpi287
  148. !else
  149. FPFLAGS=
  150. !endif
  151. !endif
  152. !endif
  153.  
  154. INTASM=
  155. PCFBASM=
  156.  
  157. # Define the generic compilation rules.
  158.  
  159. .asm.obj:
  160.     $(ASM) $(ASMFLAGS) $<;
  161.  
  162. # Make sure we get the right default target for make.
  163.  
  164. dosdefault: gs$(XE)
  165.     %null
  166.  
  167. # -------------------------- Auxiliary programs --------------------------- #
  168.  
  169. echogs$(XE): echogs.c
  170.     echo OPTION STUB=$(STUB) >_temp_.tr
  171.     $(CCL) $(CCFLAGS) -i=$(LIBDIR) @_temp_.tr echogs.c
  172.  
  173.  
  174. genarch$(XE): genarch.c
  175.     $(CCL) $(CCFLAGS) -i=$(LIBDIR) genarch.c
  176.  
  177. # We need a substitute for the Unix uniq utility.
  178. # It only has to handle stdin and stdout, no options.
  179. uniq$(XE): uniq.c
  180.     echo OPTION STUB=$(STUB) >_temp_.tr
  181.     $(CCL) $(CCFLAGS) -i=$(LIBDIR) @_temp_.tr uniq.c
  182.  
  183. # Define the compilation flags.
  184.  
  185. !ifneq NOPRIVATE 0
  186. CP=-dNOPRIVATE
  187. !else
  188. CP=
  189. !endif
  190.  
  191. !ifneq DEBUG 0
  192. CD=-dDEBUG
  193. !else
  194. CD=
  195. !endif
  196.  
  197. !ifneq TDEBUG 0
  198. CT=-d2
  199. LCT=DEBUG ALL
  200. !else
  201. CT=-d1
  202. LCT=DEBUG LINES
  203. !endif
  204.  
  205. !ifneq DEBUG 0
  206. CS=
  207. !else
  208. !  ifneq TDEBUG 0
  209. CS=
  210. !  else
  211. CS=-s
  212. !  endif
  213. !endif
  214.  
  215. GENOPT=$(CP) $(CD) $(CT) $(CS)
  216.  
  217. CCFLAGS=$(GENOPT) $(PLATOPT) $(FPFLAGS)
  218. CC=$(COMP) -oi -i=$(INCDIR) $(CCFLAGS)
  219. CCL=$(CLINK) -p -oi -i=$(INCDIR) -l=dos4g
  220. CCC=$(CC)
  221. CCD=$(CC)
  222. CC0=$(CC)
  223. CCINT=$(CC)
  224.  
  225. .c.obj:
  226.     $(CCC) $<
  227.  
  228. # ------ Devices and features ------ #
  229.  
  230. # Choose the language feature(s) to include.  See gs.mak for details.
  231. # Since we have a large address space, we include the optional features.
  232.  
  233. FEATURE_DEVS=filter.dev dps.dev level2.dev
  234.  
  235. # Choose the device(s) to include.  See devs.mak for details.
  236.  
  237. DEVICE_DEVS=vga.dev ega.dev tseng.dev epson.dev bj10e.dev paintjet.dev
  238. DEVICE_DEVS2=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev
  239. DEVICE_DEVS3=pbm.dev pbmraw.dev pgm.dev pgmraw.dev ppm.dev ppmraw.dev
  240. DEVICE_DEVS4=gifmono.dev gif8.dev pcxmono.dev pcx16.dev pcx256.dev bit.dev
  241. !include gs.mak
  242. !include devs.mak
  243.  
  244. # -------------------------------- Library -------------------------------- #
  245.  
  246. # The Watcom C platform
  247.  
  248. watc__=gp_iwatc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ)
  249. watc_.dev: $(watc__)
  250.     $(SHP)gssetmod watc_ $(watc__)
  251.  
  252. gp_iwatc.$(OBJ): gp_iwatc.c $(string__h) $(gx_h) $(gp_h)
  253.  
  254. gp_dosfb.$(OBJ): gp_dosfb.c $(memory__h) $(gx_h) $(gp_h) $(gserrors_h) $(gxdevice_h)
  255.  
  256. gp_msdos.$(OBJ): gp_msdos.c $(dos__h) $(string__h) $(gx_h) $(gp_h)
  257.  
  258. # ----------------------------- Main program ------------------------------ #
  259.  
  260. BEGINFILES=ccf.tr
  261.  
  262. LIBDOS=$(LIB) gp_iwatc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ) objw.tr lib.tr
  263.  
  264. # Interpreter main program
  265.  
  266. GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ) $(LIBDOS)
  267.  
  268. gs.exe: $(GS_ALL)
  269.     echo OPTION STUB=$(STUB) >_temp_.tr
  270.     echo OPTION STACK=8k >>_temp_.tr
  271.     echo LIBRARY $(LIBDIR)\math387r >>_temp_.tr
  272.     echo LIBRARY $(LIBDIR)\DOS\clib3r >>_temp_.tr
  273.     $(LINK) $(LCT) @gsw.tr @objw.tr @_temp_.tr
  274.     erase _temp_.tr
  275.